export interface PythonMirrorIndex {
  versions: PythonVersionInfo[];
  next?: string;
}

/**
 * 版本别名
 * @code
 * ```json
 * [
 *     {
 *       "target": "python.exe",
 *       "name": "python3.14.exe"
 *     },
 *     {
 *       "target": "pythonw.exe",
 *       "windowed": 1,
 *       "name": "pythonw3.14.exe"
 *     }
 * ]
 * ```
 */
export interface PythonVersionAlias {
  target: string;
  name: string;
}

/**
 * Python版本信息
 *
 * @code
 * ```json
 * {
 *     "schema": 1,
 *     "id": "pythoncore-3.14-64",
 *     "sort-version": "3.14.0b4",
 *     "company": "PythonCore",
 *     "tag": "3.14-dev-64",
 *     "install-for": [
 *         "3.14.0b4-64",
 *         "3.14-64",
 *         "3-64",
 *         "3.14-dev-64",
 *         "3-dev-64"
 *     ],
 *     "alias": [
 *         {
 *             "target": "python.exe",
 *             "name": "python3.14.exe"
 *         },
 *         {
 *             "target": "python.exe",
 *             "name": "python3.14-64.exe"
 *         },
 *         {
 *             "target": "python.exe",
 *             "name": "python3.exe"
 *         },
 *         {
 *             "target": "python.exe",
 *             "name": "python3-64.exe"
 *         },
 *         {
 *             "target": "pythonw.exe",
 *             "windowed": 1,
 *             "name": "pythonw3.14.exe"
 *         },
 *         {
 *             "target": "pythonw.exe",
 *             "windowed": 1,
 *             "name": "pythonw3.14-64.exe"
 *         },
 *         {
 *             "target": "pythonw.exe",
 *             "windowed": 1,
 *             "name": "pythonw3.exe"
 *         },
 *         {
 *             "target": "pythonw.exe",
 *             "windowed": 1,
 *             "name": "pythonw3-64.exe"
 *         }
 *     ],
 *     "display-name": "Python 3.14.0b4",
 *     "executable": ".\\python.exe",
 *     "url": "https://www.python.org/ftp/python/3.14.0/python-3.14.0b4-amd64.zip",
 *     "hash": {
 *         "sha256": "67523e872e5b9c421f74d159200c34f0c4148b44fc479ac12d2a64a99f666b9d"
 *     }
 * }
 * ```
 */
export interface PythonVersionInfo {
  schema: number;
  id: string;
  "sort-version": string;
  company: "PythonCore" | "PythonTest" | "PythonEmbed";
  tag: string;
  "install-for": string[];
  alias: PythonVersionAlias[];
  "display-name": string;
  executable: string;
  url: string;
  hash?: {
    sha256: string;
  };
}
